package com.lu.banktrade.controller;


import com.lu.banktrade.pojo.dto.SavingDTO;
import com.lu.banktrade.servic.AccountService;
import com.lu.banktrade.utils.ResultUtil;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.Objects;


/**
 * 银行卡
 * @author L
 */
@RestController
@RequestMapping("/trade")
public class AccountController {

    @Resource
    private AccountService accountService;

    @PostMapping("/saving")
    public ResultUtil saving(@RequestBody SavingDTO dto){
        if (Objects.isNull(dto)){
            return ResultUtil.fail("参数不能为空");
        }
        return accountService.saving(dto);

    }
}
